package com.cainaer.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cainaer.product.domain.MemberPrice;
import com.cainaer.product.mapper.MemberPriceMapper;
import com.cainaer.product.service.IMemberPriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 商品会员价表 服务实现类
 * </p>
 *
 * @author Tina
 * @since 2020-09-11
 */
@Service
public class MemberPriceServiceImpl extends ServiceImpl<MemberPriceMapper, MemberPrice> implements IMemberPriceService {

    @Autowired
    private MemberPriceMapper memberPriceMapper;

    /**
     * 新增商品会员价格
     *
     * @param memberPrice
     * @return
     */
    @Override
    public Integer insertMemberPrice(MemberPrice memberPrice) {
        return memberPriceMapper.insert(memberPrice);
    }

    /**
     * 编辑商品会员价
     *
     * @param memberPrice
     * @return
     */
    @Override
    public Integer editMemberPrice(MemberPrice memberPrice) {
        return memberPriceMapper.updateById(memberPrice);
    }
}
